{include file="public/meat" title="订单列表"/}
{load href="__ADMIN__/css/order.css" /}
<div class="layout cx-fex-c mt-20">
    <div class="x11 b-b pad-b10">
    <a class="button {neq name='$Request.action' value='index'}bg-blue{/neq} mr-10" href="{:url('index')}">订单速览</a>
    <a class="button {neq name='$Request.action' value='allindex'}bg-blue{/neq} mr-10" href="{:url('allindex')}">全部订单列表</a>
    <a class="button {neq name='$Request.action' value='shopindex'}bg-blue{/neq} mr-10" href="{:url('shopindex')}">产品订单列表</a>
    <a class="button {neq name='$Request.action' value='tuanindex'}bg-blue{/neq}" href="{:url('tuanindex')}">拼团订单列表</a>
    </div>
</div>
<div class="layout cx-fex-c">
    <div class="xl11 pad-t20">
        <form class="layui-form layui-form-pane" role="form" action="{:url('solist')}" method="post">
            <div class="cx-input-tabel" style="margin-bottom: 5px;">
                <label class="cx-input-fl">订单类型</label>
                <input type="radio" name="mid" value="all" {eq name="so.mid|default='all'" value="all"}checked{/eq} title="全部">
                <input type="radio" name="mid" value="100" {eq name="so.mid|default=''" value="100"}checked{/eq} title="商品订单">
                <input type="radio" name="mid" value="101" {eq name="so.mid|default=''" value="101"}checked{/eq} title="团购订单">
            </div>
            <div class="cx-input-tabel" style="margin-bottom: 5px;">
                <label class="cx-input-fl">订单状态</label>
                <input type="radio" name="playstatus" value="all" {eq name="so.playstatus|default='all'" value="all"}checked{/eq} title="全部">
                <input type="radio" name="playstatus" value="0" {eq name="so.playstatus|default=''" value="0"}checked{/eq} title="未付款">
                <input type="radio" name="playstatus" value="1" {eq name="so.playstatus|default=''" value="1"}checked{/eq} title="已付款">
                <input type="radio" name="playstatus" value="2" {eq name="so.playstatus|default=''" value="2"}checked{/eq} title="已发货">
                <input type="radio" name="playstatus" value="5" {eq name="so.playstatus|default=''" value="5"}checked{/eq} title="已收货">
                <input type="radio" name="playstatus" value="6" {eq name="so.playstatus|default=''" value="6"}checked{/eq} title="申请退款">
                <input type="radio" name="playstatus" value="3" {eq name="so.playstatus|default=''" value="3"}checked{/eq} title="已退款">
            </div>
            <div class="cx-input-tabel" style="margin-bottom: 5px;">
                <label class="cx-input-fl">日期范围</label>
                <input id="laytimes" class="ipt" name="times" placeholder="请选择日期" type="text" value="{$so.times|default=''}">
                <label class="cx-input-fl">关键词</label>
                <input class="ipt" name="keyword" placeholder="请输入搜索内容" type="text" value="{$so.keyword|default=''}">
            </div>
            <div class="layui-fluid" style="text-align: center;">
                <input class="ipt" name="keys" value="{$so.keys|default=$Request.action}" type="hidden">
                <button class="button bg-blue" type="submit"><i class="fa fa-search"></i> 搜索订单</button>
            </div>
        </form>
    </div>
</div>
<div class="layout cx-fex-c">
    <div class="x11">
        <form class="layui-form layui-form-pane mt-15" role="form" action="" method="post">
            <table id="table" class="cx-teble cx-teble-bor-w cx-teble-bor cx-table-striped cx-table-hover cx-table-responsive-w">
                <thead>
                <tr>
                    <th class="t-c" width="80"><label><input id="all" class="inverted" type="checkbox" lay-ignore> ID</label></th>
                    <th width="80%">订单信息</th>
                    <th class="t-c">编辑</th>
                </tr>
                </thead>
                <tbody>
                {volist name="orderlist" id="cx" empty=""}
                <tr>
                    <td class="t-c alltd">
                        <input class="inverted" name="pdel[]" type="checkbox" lay-ignore value="{$cx.oid}"> {$i}
                    </td>
                    <td>{eq name="cx.mid" value="100"}【订单】{/eq}{eq name="cx.mid" value="101"}【团购】{/eq}{$cx.title}</td>
                    <td class="t-c">{$cx.addtime|date="Y-m-d h:i:d",###}</td>
                </tr>
                <tr>
                    <td class="t-c"></td>
                    <td>
                        <div class="layout cx-fex-l order-li-cont">
                        {eq name="cx.mid" value="100"}
                        {volist name="cx.conf.shop" id="c" empty="" key="k"}
                        <div class="layout cx-fex-l order-li-contcp">
                            <div class="order-li-img">
                                <img class="img-responsive" src="{$c.picurl}" alt="{$c.title}" >
                            </div>
                            <div class="xl9 pad-l10 cx-fex fex-column">
                                <h3 class="or-title t-14">{$c.title}</h3>
                                <div class="layout cx-fex-l">
                                    数量: {$c.num}
                                </div>
                            </div>
                        </div>
                        {/volist}
                        {else /}
                        <div class="xl4 cx-fex-l fex-items-c">
                            <div class="layout order-li-img">
                                <img class="img-responsive" src="{$cx.conf.picurl}" alt="{$cx.title}" >
                            </div>
                            <h3 class="or-title t-14 pad-l10">{$cx.title}</h3>
                        </div>
                        <div class="xl8">
                            <div class="layout cx-fex-l order-li-contcp">
                                <div class="xl8 pad-l10 cx-fex fex-column">
                                    <h3 class="or-title t-14"><span class="t-gray">微信昵称: </span>{$cx.conf.nickname}</h3>
                                    <ul class="layout cx-fex-l fex-column">
                                        <li><span class="t-gray">姓名: </span> {$cx.conf.adduname}</li>
                                        <li><span class="t-gray">手机: </span> {$cx.conf.phone}</li>
                                        <li class="cx-fex-l cx-fex-nowrap">
                                            <span class="t-gray" style="min-width: 40px">地址: </span>
                                            <div class="">{$cx.conf.addres}</div>
                                        </li>
                                    </ul>
                                </div>
                                <ul class="xl4 cx-fex-c fex-items-c fex-column">
                                    <li><span class="mr-5 t-gray">金额:</span><span class="t-red t-16">{:number_format($cx['allmoney'] / 100,'2')}</span></li>
                                    <li class="mt-10">
                                        <a class="order-li-contan button button-S bg-blue" href="{:url('edit',array('oid'=>$cx.oid))}">
                                            {switch name="$cx.playstatus" }{case value="1"} 去发货 {/case} {case value="2"} 等待收货 {/case} {case value="3"} 已退款 {/case} {case value="5"} 已收货 {/case} {case value="6"} 申请退款 {/case} {default /} {gt name="$thistime-$cx.addtime" value="26400"} 订单已关闭 {else /} 待付款 {/gt} {/switch}
                                        </a>
                                        {switch name="$cx.playstatus" }
                                        {case value="6"} <a class="order-li-contan button button-S bg-blue ml-5" href="{:url('edit',array('oid'=>$cx.oid))}">处理退款</a> {/case}
                                        {case value="0|4"} {gt name="$thistime-$cx.addtime" value="26400"}  <a class="button button-S bg-red cx-click" data-id="{$cx.oid}" data-href="{:url('del')}" data-type="deldata">删除订单</i></a> {else /} <a class="order-li-contan button button-S bg-blue ml-5" href="{:url('edit',array('oid'=>$cx.oid))}">修改价格</a> {/gt}{/case}
                                        {/switch}
                                    </li>
                                </ul>
                            </div>
                            {volist name="cx.fudata" id="c" empty="" key="k"}
                            <div class="layout cx-fex-l order-li-contcp">
                                <div class="xl8 pad-l10 cx-fex fex-column">
                                    <h3 class="or-title t-14"><span class="t-gray">微信昵称: </span>{$c.conf.nickname}</h3>
                                    <ul class="layout cx-fex-l fex-column">
                                        <li><span class="t-gray">姓名: </span> {$c.conf.adduname}</li>
                                        <li><span class="t-gray">手机: </span> {$c.conf.phone}</li>
                                        <li class="cx-fex-l cx-fex-nowrap">
                                            <span class="t-gray" style="min-width: 40px">地址: </span>
                                            <div class="">{$c.conf.addres}</div>
                                        </li>
                                    </ul>
                                </div>
                                <ul class="xl4 cx-fex-c fex-items-c fex-column">
                                    <li><span class="mr-5 t-gray">金额:</span><span class="t-red t-16">{:number_format($c['allmoney'] / 100,'2')}</span></li>
                                    <li class="mt-10">
                                        <a class="order-li-contan button button-S bg-blue" href="{:url('edit',array('oid'=>$c.oid))}">
                                            {switch name="$c.playstatus" }{case value="1"} 去发货 {/case} {case value="2"} 等待收货 {/case} {case value="3"} 已退款 {/case} {case value="5"} 已收货 {/case} {case value="6"} 申请退款 {/case} {default /} {gt name="$thistime-$c.addtime" value="26400"} 订单已关闭 {else /} 待付款 {/gt} {/switch}
                                        </a>
                                        {switch name="$c.playstatus" }
                                        {case value="6"} <a class="order-li-contan button button-S bg-blue ml-5" href="{:url('edit',array('oid'=>$c.oid))}">处理退款</a> {/case}
                                        {case value="0|4"} {gt name="$thistime-$c.addtime" value="26400"} <a class="button button-S bg-red cx-click" data-id="{$c.oid}" data-href="{:url('del')}" data-type="deldata">删除订单</i></a> {else /} <a class="order-li-contan button button-S bg-blue ml-5" href="{:url('edit',array('oid'=>$c.oid))}">修改价格</a> {/gt}{/case}
                                        {/switch}
                                    </li>
                                </ul>
                            </div>
                            {/volist}
                        </div>
                        {/eq}
                        </div>
                    </td>
                    <td class="t-c">
                        {eq name="cx.mid" value="100"}
                        <ul class="layout cx-fex-c fex-items-c fex-column">
                            <li><span class="mr-5 t-gray">金额:</span><span class="t-red t-16">{:number_format($cx['allmoney'] / 100,'2')}</span></li>
                            <li>
                                <a class="order-li-contan button button-S bg-blue mt-10" href="{:url('edit',array('oid'=>$cx.oid))}">
                                    {switch name="$cx.playstatus" }{case value="1"} 去发货 {/case} {case value="2"} 等待收货 {/case} {case value="3"} 已退款 {/case}{case value="5"} 已收货 {/case} {case value="6"} 申请退款 {/case} {default /} {gt name="$thistime-$cx['addtime']" value="26400"} 订单已关闭 {else /} 待付款 {/gt} {/switch}
                                </a>
                                {switch name="$cx.playstatus" }
                                {case value="6"} <a class="order-li-contan button button-S bg-blue mt-10" href="{:url('edit',array('oid'=>$cx.oid))}">处理退款</a> {/case}
                                {case value="0"} {case value="0|4"} {gt name="$thistime-$cx.addtime" value="26400"}  <a class="button button-S bg-red cx-click" data-id="{$cx.oid}" data-href="{:url('del')}" data-type="deldata">删除订单</i></a> {else /} <a class="order-li-contan button button-S bg-blue mt-10" href="{:url('edit',array('oid'=>$cx.oid))}">修改价格</a> {/gt}{/case}
                                {/switch}
                            </li>
                        </ul>
                        {/eq}
                    </td>
                </tr>
                {/volist}
                </tbody>
            </table>
            <div class="t-c mt-20">
                {$pages}
            </div>
            <div class="t-c pad-t20">
                <a class="button button-S bg-blue" data-type="csv" data-cid="table" onclick="allcsv(this)">全部导出</a>
                <a class="button button-S bg-blue" data-type="csv" data-cid="table" onclick="closcsv(this)">选择导出</a>
                <button class="button button-S bg-red" data-href="{:url('pdel')}" data-type="pdel" lay-submit="" lay-filter="sd-btn">批量删除</button>
            </div>
            <div class="text-c pad-t20"></div>
        </form>
    </div>
</div>
{include file="public/js" /}
<script>
    layui.config({
        base: '__ADMIN__/js/'
    }).use('app');
</script>
{include file="order/foot" /}
{include file="public/footer" /}
<table id="xue" class="cx-teble table table-border table-bordered table-striped table-hover table-bg" style="display: none">
    <thead>
    <tr>
        <th class="t-c" width="80"><label><input id="all" class="inverted" type="checkbox" lay-ignore> ID</label></th>
        <th width="80%">订单信息</th>
        <th class="t-c">编辑</th>
    </tr>
    </thead>
    <tbody>
    </tbody>
</table>